CFLAGS = -I. -I/usr/local/include/igraph/ -I/usr/include/igraph/ -Wall -Werror -c
LDFLAGS = -L/usr/local/lib -L/usr/lib/ -ligraph -Wall -Werror
CC = g++
PROGRAMMA = ixp
OBJECTS = ixp_graph_load.o ixp_graph_metric.o ixp_graph_print.o my_utility.o ixp.o


$(PROGRAMMA).exe:	$(OBJECTS)
	$(CC) -o $(PROGRAMMA).exe $(OBJECTS) $(LDFLAGS)

ixp_graph_load.o:	ixp_graph_load.cpp ixp_graph.h define.h my_utility.h
	$(CC) $(CFLAGS) ixp_graph_load.cpp -o ixp_graph_load.o

ixp_graph_metric.o:	ixp_graph_metric.cpp ixp_graph.h define.h
	$(CC) $(CFLAGS) ixp_graph_metric.cpp -o ixp_graph_metric.o

ixp_graph_print.o:	ixp_graph_print.cpp ixp_graph.h define.h
	$(CC) $(CFLAGS) ixp_graph_print.cpp -o ixp_graph_print.o

my_utility.o:	my_utility.cpp my_utility.h define.h
	$(CC) $(CFLAGS) my_utility.cpp -o my_utility.o

ixp.o:			ixp.cpp define.h ixp_graph.h
	$(CC) $(CFLAGS) ixp.cpp -o ixp.o

.PHONY:	clean
clean:
	rm $(PROGRAMMA).exe $(OBJECTS) -f
